package com.yanqu.road.entity.assistant;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_u_assistant_setting")
public class AssistantSettingUserData extends DataObject {

    @FieldTypeAnnotation(desc = "用户id",select = true,update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "自动操作类型勾选列表")
    private List<Integer> operateTypeList;

    @FieldTypeAnnotation(desc = "行善次数")
    private int charitableTimes;

    @FieldTypeAnnotation(desc = "美女事件选择的美女id")
    private int beautyId;

    @FieldTypeAnnotation(desc = "孙子自动入学，学院=>门客id")
    private Map<Integer, Integer> grandChildEnterSchoolMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "徒弟自动培养是否开启仙童领悟")
    private boolean openComprehend;

    @FieldTypeAnnotation(desc = "美女百连传唤是否开启")
    private boolean beautyFavorHundred;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public List<Integer> getOperateTypeList() {
        return operateTypeList;
    }

    public void setOperateTypeList(List<Integer> operateTypeList) {
        if (operateTypeList == null) {
            return;
        }
        this.operateTypeList = operateTypeList;
        setOp(DataStatus.Update);
    }

    public int getCharitableTimes() {
        return charitableTimes;
    }

    public void setCharitableTimes(int charitableTimes) {
        if (this.charitableTimes != charitableTimes) {
            this.charitableTimes = charitableTimes;
            setOp(DataStatus.Update);
        }
    }

    public int getBeautyId() {
        return beautyId;
    }

    public void setBeautyId(int beautyId) {
        if (this.beautyId != beautyId) {
            this.beautyId = beautyId;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, Integer> getGrandChildEnterSchoolMap() {
        return grandChildEnterSchoolMap;
    }

    public void setGrandChildEnterSchoolMap(Map<Integer, Integer> grandChildEnterSchoolMap) {
        if (grandChildEnterSchoolMap == null) {
            return;
        }
        this.grandChildEnterSchoolMap = grandChildEnterSchoolMap;
        setOp(DataStatus.Update);
    }

    public boolean isOpenComprehend() {
        return openComprehend;
    }

    public void setOpenComprehend(boolean openComprehend) {
        if (this.openComprehend != openComprehend) {
            this.openComprehend = openComprehend;
            setOp(DataStatus.Update);
        }
    }

    public boolean isBeautyFavorHundred() {
        return beautyFavorHundred;
    }

    public void setBeautyFavorHundred(boolean beautyFavorHundred) {
        if (this.beautyFavorHundred != beautyFavorHundred) {
            this.beautyFavorHundred = beautyFavorHundred;
            setOp(DataStatus.Update);
        }
    }
}
